package com.chatplus.application.common.util;

import java.util.Arrays;

@SuppressWarnings("unused")
public abstract class UrlUtils {
    public static String join(CharSequence... parts) {
        return String.join("/", Arrays.stream(parts).filter(p -> null != p && !p.equals("")).toArray(CharSequence[]::new))
            .replaceAll("/{2,}", "/")
            .replaceFirst(":/", "://");
    }

}
